//var store vertext shader color info
varying lowp vec4 frag_Color;
//var store texture coord from vertext shader
varying lowp vec2 frag_TexCoord;
//var storee
uniform sampler2D u_Texture;
//define Light
struct Light {
    lowp vec3 Color;//color
    lowp float AmbientIntensity;//light times
};
//unfor stroe light
uniform Light u_Light;
void main(void) {
// set value for each fragment with vetex color
    //get the color of texCoord Texture :texture2D(u_Texture, frag_TexCoord)
    lowp vec4 AmbientColor = vec4(u_Light.Color, 1.0) * u_Light.AmbientIntensity;
    gl_FragColor =  texture2D(u_Texture, frag_TexCoord) * (AmbientColor);
//    gl_FragColor = vec4(1,1,1,1);
}
